<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>P126 6.2.1 全局作用域</title>
</head>

<body>
    <script>
        var area = 'Beijing';
        function getArea() {
            return this.area;
        }
        console.log(area);
        console.log(window.area);
        console.log(getArea());
        console.log(window.getArea());
        console.log(window.Number(area));
    </script>
    <a href="../首页/page06.html">
        <h2>返回上一页面</h2>
    </a>
</body>

</html>